home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / IFF / IFF_Forms / PGTB.doc < prev    next >
Encoding:
Text File  |  1993-03-01  |  4.5 KB  |  92 lines

  1. Program traceback (SAS Institute)
  2.  
  3. FORM PGTB
  4.  
  5. Proposal:
  6.         New IFF chunk type, to be named PGTB, meaning ProGram TraceBack.
  7.  
  8. Format:
  9.  
  10.         'PGTB'          - chunk identifier
  11.         length          - longword for length of chunk
  12.  
  13.         'FAIL'          - subfield giving environment at time of crash
  14.         length          - longword length of subfield
  15.         NameLen         - length of program name in longwords (BSTR)
  16.         Name            - program name packed in longwords
  17.         Environment     - copy of AttnFlags field from ExecBase,
  18.                           gives type of processor, and existence of
  19.                           math chip
  20.         VBlankFreq      - copy of VBlankFrequency field from ExecBase
  21.         PowerSupFreq    - copy of PowerSupplyFrequency field from ExecBase
  22.                           above fields may be used to determine whether
  23.                           machine was PAL or NTSC
  24.         Starter         - non-zero = CLI, zero = WorkBench
  25.         GURUNum         - exception number of crash
  26.         SegCount        - number of segments for program
  27.         SegList         - copy of seglist for program
  28.                           (Includes all seglist pointers, paired with
  29.                            sizes of the segments)
  30.  
  31.         'REGS'          - register dump subfield
  32.         length          - length of subfield in longwords
  33.         GURUAddr        - PC at time of crash
  34.         Flags           - copy of Condition Code Register
  35.         DDump           - dump of data registers
  36.         ADump           - dump of address registers
  37.  
  38.         'VERS'          - revision of program which created this file
  39.         length          - length of subfield in longwords
  40.         version         - main version of writing program
  41.         revision        - minor revision level of writing program
  42.         TBNameLen       - length of name of writing program
  43.         TBName          - name of writing program packed in longwords (BSTR)
  44.  
  45.         'STAK'          - stack dump subfield
  46.         length          - length of subfield in longwords
  47.         (type)          - tells type of stack subfield, which can be any of
  48.                           the following:
  49.                 -----------------------------------------------------------
  50.                 Info            - value 0
  51.                 StackTop        - address of top of stack
  52.                 StackPtr        - stack pointer at time of crash
  53.                 StackLen        - number of longwords on stack
  54.  
  55.                 -----------------------------------------------------------
  56.                 Whole stack     - value 1
  57.                                   only used if total stack to be dumped is 8k
  58.                                   or less in size
  59.                 Stack           - dump of stack from current to top
  60.  
  61.                 -----------------------------------------------------------
  62.                 Top 4k          - value 2
  63.                                   if stack used larger than 8k, this part
  64.                                   is a dump of the top 4k
  65.                 Stack           - dump of stack from top - 4k to top
  66.  
  67.                 -----------------------------------------------------------
  68.                 Bottom 4k       - value 3
  69.                                   if stack used larger than 8k, this part
  70.                                   is a dump of the bottom 4k
  71.                 Stack           - dump of stack from current to current + 4k
  72.  
  73.         In other words, we will dump a maximum of 8k of stack data.  This
  74.         does NOT mean the stack must be less than 8k in size to dump the
  75.         entire stack, just that the amount of stack USED be less than 8k.
  76.  
  77.         'UDAT'          - Optional User DATa chunk.  If the user assigns
  78.                           a function pointer to the label "_ONGURU", the
  79.                           catcher will call this routine prior to closing
  80.                           the SnapShot file, passing one parameter on the
  81.                           stack - an AmigaDOS file pointer to the SnapShot
  82.                           file.  Spec for the _ONGURU routine:
  83.  
  84.                                 void <function name>(fp)
  85.                                 long fp;
  86.  
  87.                           In other words, your routine must be of type 'void'
  88.                           and must take one parameter, an AmigaDOS file
  89.                           handle (which AmigaDOS wants to see as a LONG).
  90.         length          - length of the UserDATa chunk, calculated after the
  91.                           user routine terminates.
  92.